/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

云编译
云编译相关接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#ifndef CompileClient_h
#define CompileClient_h


#import <JDCloudOCSDKCore/JDCloudOCSDKCore.h>
#import <JDCloudOCSDKCompile/CompileApiModel.h>

@interface CompileClient : NSObject<JDCloudClient>{
    @private
    NSString* _userAgent;
    NSString* _serviceName;
    NSString* _version;
    }

    @property (strong,readonly,nonatomic) NSString* userAgent;

    @property (strong,readonly,nonatomic) NSString* serviceName;

    @property (strong,readonly,nonatomic) NSString* version;

    @property (strong,nonatomic) NSString* contentType;

    @property (strong,nonatomic) Credential* credential;

    @property (strong,nonatomic) SDKEnvironment* sdkEnvironment;

    @property (strong,nonatomic) NSMutableDictionary* customHeader;

    @property  (strong,nonatomic) NSString* httpRequestProtocol;

    -(void) addCustomerHeaderWithKey:(NSString*) key
    value:(NSString*) value;

    -(id)initWithGlobalConfig;

    -(id)initWithCredential:(Credential*)credential
    sdkEnvironment:(SDKEnvironment*)sdkEnvironment;
    -(id)initWithCredential:(Credential*)credential;
    /**
    getJob sync request
    @param getJobRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getJobResponse` the request response data model
    */
    -(NSDictionary*) getJobSyncWithRequest:(CompileGetJobRequest*) getJobRequest;

    -(void)getJobAsyncWithRequest:(CompileGetJobRequest*) getJobRequest
    completionHandler:(void(^)(int statusCode,CompileGetJobResponse* _Nullable getJobResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    startJob sync request
    @param startJobRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `startJobResponse` the request response data model
    */
    -(NSDictionary*) startJobSyncWithRequest:(CompileStartJobRequest*) startJobRequest;

    -(void)startJobAsyncWithRequest:(CompileStartJobRequest*) startJobRequest
    completionHandler:(void(^)(int statusCode,CompileStartJobResponse* _Nullable startJobResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getExternalLink sync request
    @param getExternalLinkRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getExternalLinkResponse` the request response data model
    */
    -(NSDictionary*) getExternalLinkSyncWithRequest:(CompileGetExternalLinkRequest*) getExternalLinkRequest;

    -(void)getExternalLinkAsyncWithRequest:(CompileGetExternalLinkRequest*) getExternalLinkRequest
    completionHandler:(void(^)(int statusCode,CompileGetExternalLinkResponse* _Nullable getExternalLinkResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    stopBuild sync request
    @param stopBuildRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `stopBuildResponse` the request response data model
    */
    -(NSDictionary*) stopBuildSyncWithRequest:(CompileStopBuildRequest*) stopBuildRequest;

    -(void)stopBuildAsyncWithRequest:(CompileStopBuildRequest*) stopBuildRequest
    completionHandler:(void(^)(int statusCode,CompileStopBuildResponse* _Nullable stopBuildResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    createDemo sync request
    @param createDemoRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createDemoResponse` the request response data model
    */
    -(NSDictionary*) createDemoSyncWithRequest:(CompileCreateDemoRequest*) createDemoRequest;

    -(void)createDemoAsyncWithRequest:(CompileCreateDemoRequest*) createDemoRequest
    completionHandler:(void(^)(int statusCode,CompileCreateDemoResponse* _Nullable createDemoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getJobs sync request
    @param getJobsRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getJobsResponse` the request response data model
    */
    -(NSDictionary*) getJobsSyncWithRequest:(CompileGetJobsRequest*) getJobsRequest;

    -(void)getJobsAsyncWithRequest:(CompileGetJobsRequest*) getJobsRequest
    completionHandler:(void(^)(int statusCode,CompileGetJobsResponse* _Nullable getJobsResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    deleteJob sync request
    @param deleteJobRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteJobResponse` the request response data model
    */
    -(NSDictionary*) deleteJobSyncWithRequest:(CompileDeleteJobRequest*) deleteJobRequest;

    -(void)deleteJobAsyncWithRequest:(CompileDeleteJobRequest*) deleteJobRequest
    completionHandler:(void(^)(int statusCode,CompileDeleteJobResponse* _Nullable deleteJobResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    updateJob sync request
    @param updateJobRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateJobResponse` the request response data model
    */
    -(NSDictionary*) updateJobSyncWithRequest:(CompileUpdateJobRequest*) updateJobRequest;

    -(void)updateJobAsyncWithRequest:(CompileUpdateJobRequest*) updateJobRequest
    completionHandler:(void(^)(int statusCode,CompileUpdateJobResponse* _Nullable updateJobResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getBuildLog sync request
    @param getBuildLogRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getBuildLogResponse` the request response data model
    */
    -(NSDictionary*) getBuildLogSyncWithRequest:(CompileGetBuildLogRequest*) getBuildLogRequest;

    -(void)getBuildLogAsyncWithRequest:(CompileGetBuildLogRequest*) getBuildLogRequest
    completionHandler:(void(^)(int statusCode,CompileGetBuildLogResponse* _Nullable getBuildLogResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    createJob sync request
    @param createJobRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createJobResponse` the request response data model
    */
    -(NSDictionary*) createJobSyncWithRequest:(CompileCreateJobRequest*) createJobRequest;

    -(void)createJobAsyncWithRequest:(CompileCreateJobRequest*) createJobRequest
    completionHandler:(void(^)(int statusCode,CompileCreateJobResponse* _Nullable createJobResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    deleteJobs sync request
    @param deleteJobsRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteJobsResponse` the request response data model
    */
    -(NSDictionary*) deleteJobsSyncWithRequest:(CompileDeleteJobsRequest*) deleteJobsRequest;

    -(void)deleteJobsAsyncWithRequest:(CompileDeleteJobsRequest*) deleteJobsRequest
    completionHandler:(void(^)(int statusCode,CompileDeleteJobsResponse* _Nullable deleteJobsResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    getBuildStatus sync request
    @param getBuildStatusRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getBuildStatusResponse` the request response data model
    */
    -(NSDictionary*) getBuildStatusSyncWithRequest:(CompileGetBuildStatusRequest*) getBuildStatusRequest;

    -(void)getBuildStatusAsyncWithRequest:(CompileGetBuildStatusRequest*) getBuildStatusRequest
    completionHandler:(void(^)(int statusCode,CompileGetBuildStatusResponse* _Nullable getBuildStatusResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;

    /**
    compile common sync request
    @param  jdcloudDataRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
    */
    -(NSDictionary*) compileCommonSyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                           url:(NSString*) url
                                        method:(NSString*) method;

    -(void)compileCommonAsyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                  url:(NSString*) url
                               method:(NSString*) method
                    completionHandler:(void(^)(int statusCode, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;

    @end


    #endif /* CompileClient_h */
